package com.evon.yardmanagement.ui.dto;

import org.dozer.Mapping;


public class ParkingSlotDTO {
	
	private int id;
	
	

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Integer getSectionId() {
		return section.getSectionId();
	}
	public String getSectionName() {
		return section.getSectionName();
	}
	public SectionDTO section = new SectionDTO();
	public Integer getYardId() {
		return section.getYardId();
	}
	public String getYardName() {
		return section.getYardName();
	}
	@Mapping("number")
	private Integer slotNumber;
	@Mapping("name")
	private String slotName;
	private Integer priority;
	@Mapping("occupied")
	private boolean occupied;
	@Mapping("active")
	private boolean active;
	
	
	
	public boolean isActive() {
		return active;
	}
	public void setActive(boolean active) {
		this.active = active;
	}
	public SectionDTO getSection() {
		return section;
	}
	public void setSection(SectionDTO section) {
		this.section = section;
	}
	public Integer getSlotNumber() {
		return slotNumber;
	}
	public void setSlotNumber(Integer slotNumber) {
		this.slotNumber = slotNumber;
	}
	public String getSlotName() {
		return slotName;
	}
	public void setSlotName(String slotName) {
		this.slotName = slotName;
	}
	public Integer getPriority() {
		return priority;
	}
	public void setPriority(Integer priority) {
		this.priority = priority;
	}
	public boolean getOccupied() {
		return occupied;
	}
	public void setOccupied(boolean occupied) {
		this.occupied = occupied;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		result = prime * result
				+ ((slotNumber == null) ? 0 : slotNumber.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ParkingSlotDTO other = (ParkingSlotDTO) obj;
		if (id != other.id)
			return false;
		if (slotNumber == null) {
			if (other.slotNumber != null)
				return false;
		} else if (!slotNumber.equals(other.slotNumber))
			return false;
		return true;
	}
	
	
	
}
